﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using MODEL;

namespace Service
{
    public class AlertMakeService_Design : IAlertMakeService
    {
        public Task<IEnumerable<AlertMakeInfo>> GetAlertMakeInfosAsync(string userId = null)
        {
            return Task<IEnumerable<AlertMakeInfo>>.Run(() => {
                return new List<AlertMakeInfo> {
                   new AlertMakeInfo{
                        Id = Guid.NewGuid().ToString(),
                        Month = 1,
                        MaxVal = 10,
                        MinVal = 1,
                        Name = "普通预警",
                        AddMan = "Man",
                        CreateTime = DateTime.Now,
                        StationInfo = new StationInfo{
                            StationId = 1,
                            StationName = "1号站点"
                        },
                        ElementInfo = new ElementInfo{
                            Id = 1,
                            ElementCode = "123",
                        }
                   }
                }.AsEnumerable();
            });
        }

        public Task<int> InsertOrUpdateAlertMakeInfo(AlertMakeInfo alertMakeInfo)
        {
            throw new NotImplementedException();
        }

        public Task<int> DeleteAlertMakeInfo(List<string> idList)
        {
            throw new NotImplementedException();
        }
    }
}
